#!/usr/bin/env python
import sys,os
base_dir = os.path.dirname(os.path.dirname(__file__))
sys.path.append(base_dir)
from bin.stools import s_tools

class file(object):
    @classmethod
    def help(cls):
        print('''
        file.get:  Get file
            Param:[groupname] [remote file] [local file]
            Eg: solt.py file.get web /tmp/test2 document/test.txt
        file.put:  Put file
            Param:[groupname] [local file] [remote file]
            Eg: solt.py file.put * document/test.txt /tmp/test2
               ''')
    @classmethod
    def get(cls,gname,rdir,ldir):
        s_tools.process_mutl(gname, 'ssh_get', rdir, ldir)
    @classmethod
    def put(cls,gname,ldir,rdir):
        s_tools.process_mutl(gname, 'ssh_put', ldir, rdir)
